package com.xinzhidi.web.equipment.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xinzhidi.common.annotation.Excel;
import com.xinzhidi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;


/**
 * 设备对象 equipment
 *
 * @author ruoyi
 * @date 2023-05-29
 */
@ApiModel(value = "设备对象")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("equipment")
public class Equipment extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "设备id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "dtuId")
    private Long dtuId;

    @ApiModelProperty(value = "设备级别（0：小区  1：楼栋  2：单元  3：住户）")
    private String equipmentLevel;

    @ApiModelProperty(value = "协议类型 1：户用阀门协议 2：单元阀门协议 3：室温采集器协议 4：户用热量表协议 5：单元热量表协议")
    @NotBlank(message = "协议类型不能为空")
    private String protocolType;

    @ApiModelProperty(value = "小区id")
    @Excel(name = "小区id")
    private Long lotId;

    @ApiModelProperty(value = "楼栋id")
    @Excel(name = "楼栋id")
    private Long buildId;

    @ApiModelProperty(value = "单元id")
    @Excel(name = "单元id")
    private Long unitId;

    @ApiModelProperty(value = "住户id")
    @Excel(name = "住户id")
    private Long householdId;

    @ApiModelProperty(value = "设备名称")
    @Excel(name = "设备名称")
    private String equipmentName;

    @ApiModelProperty(value = "设备编号")
    @Excel(name = "设备编号")
    private String equipmentCode;

    @ApiModelProperty(value = "设备类型")
    @Excel(name = "设备类型")
    private String equipmentType;

    @ApiModelProperty(value = "设备分组id")
    @Excel(name = "设备分组id")
    private Long equipmentGroupId;

    @ApiModelProperty(value = "详细位置")
    @Excel(name = "详细位置")
    private String address;

    @ApiModelProperty(value = "是否主动抄表（1：是  2：否）")
    @Excel(name = "是否主动抄表", readConverterExp = "1=：是,2=：否")
    private String autoRead;

    @ApiModelProperty(value = "调控方法（1：手动调控  2：自动调控）")
    @Excel(name = "调控方法", readConverterExp = "1=：手动调控,2=：自动调控,3=：锁定")
    private String regulationMethod;

    @ApiModelProperty(value = "设备状态(0未知 1 在线 2 离线)")
    private Integer status;

    @ApiModelProperty(value = "删除标志（0代表存在 2代表删除）")
    @TableLogic
    private String delFlag;

}
